<?php

namespace Database\Factories;

use App\Models\UserRecharge;
use Illuminate\Database\Eloquent\Factories\Factory;

class UserRechargeFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = UserRecharge::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'user_id' => 1,
            'order_number' => $this->faker->creditCardNumber,
            'price' => $this->faker->randomFloat(2, 0, 10),
            'give_price' =>$this->faker->randomFloat(2, 0, 10),
            'recharge_type' =>  $this->faker->randomElement(['officialAccount', 'applet', 'other']),
            'is_paid' => $this->faker->numberBetween(0, 1),
            'refund_price' => $this->faker->randomFloat(2, 0, 10),
            'channel_type' => $this->faker->title('female'),
            'pay_time' => date('Y-m-d H:i:s',$this->faker->numberBetween(1601000000, time())),
        ];
    }
}
